<template>
  <div class="activitydetail">
    <el-row
      type="flex"
      class="row-bg"
      justify="space-around"
      v-for="(v,k) in ActivityDetail "
      :key="k"
    >
      <el-col :sm="24">
        <div class="AdetailPic">
          <img :src="getpic(v.activityPicbig)" width="100%" height="100%" />
        </div>
        <el-row>
          <div class="AdetailBody">
            <el-col :md="19">
              <span class="activityHead">{{v.activityHead}}</span>
            </el-col>
            <el-col :md="5">
              <span class="activityDate">{{v.activityDate | dateDay}}</span>
            </el-col>
            <div class="activityDetail">{{v.activity}}</div>
          </div>
        </el-row>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      ActivityDetail: [],
      currentUser: {},
      activityId: this.$route.params.activityId,
      activeName: "first"
    };
  },
  methods: {
    handleClick(tab, event) {
      // console.log(tab, event);
    },
    getpic(pic) {
      let path = "http://localhost:3000/upload/" + pic;
      // console.log("图片", path);
      return path;
    }
  },
  created() {
    this.$axios
      .get(
        "http://localhost:3000/ShowAllActvity/" + this.$route.params.activityId
      )
      .then(res => {
        // console.log("查询结果：", res.data.data);
        this.ActivityDetail = res.data.data;
      })
      .catch(err => {
        console.log("错误信息：", err);
      });
  }
};
</script>
<style>
.AdetailPic {
  margin-bottom: 50px;
}
.AdetailBody {
  width: 95%;
  margin: 0 auto;
}
.AdetailBody .activityHead {
  font-size: 30px;
}
.activityDetail {
  font-size: 20px;
}
</style>
